<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>首页</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/acsuzhou/css/doc.css" />
<script type="text/javascript" src="__PUBLIC__/acsuzhou/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
<script type="text/javascript">window.boost = $.noConflict(true);</script>
<style type="text/css">
	.user-form input, .user-form select{ border: 1px solid #A6C8FF;}
</style>
</head>
<body class="bg-grey">
<div class="user-info bg-blue">
	<figure class="blend-picture blend-picture-default blend-picture-circle" style="margin:0;"> <a calss="picture-link"> <img src="{$avatar}"> </a>
		<figcaption class="blend-picture-title blend-picture-title-default">
			<h4 class="f-2x">用户</h4>
			<p class="f-1x">你还没有考试过</p>
		</figcaption>
	</figure>
	<div class="bar">
		<div class="info-bar"></div>
	</div>
</div>
<div class="user-form">
	<form action="{:U('M/Acsuzhou/exam_enter_for')}" method="post"  class="bg-white clearfix">
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">学校</label>
			<input type="text" class="blend-formgroup-input" name="school" value="{$school_name}" readonly="readonly" />
		
		</div>
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">年级</label>
			<select id="grade_id" class="blend-formgroup-select" name="grade_id" required="required">
				<option value="1">一年级</option>
				<option value="2">二年级</option>
				<option value="3">三年级</option>
				<option value="4">四年级</option>
				<option value="5">五年级</option>
				<option value="6">六年级</option>
			</select>
		</div>
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">班级</label>
			<select id="class_id" class="blend-formgroup-select" name="class_id" required="required">
				<option value="1">一班</option>
				<option value="2">二班</option>
				<option value="3">三班</option>
				<option value="4">四班</option>
				<option value="5">五班</option>
				<option value="6">六班</option>
				<option value="7">七班</option>
				<option value="8">八班</option>
				<option value="9">九班</option>
				<option value="10">十班</option>
			</select>
		</div>
		<div class="blend-formgroup">
			<label class="blend-formgroup-label f-2x">姓名</label>
			<input type="text" class="blend-formgroup-input" name="name" value="{$name}" required="required" />
		</div>
		<empty name="grade">
		<input id="grade_name" type="text" name="grade" value="一年级" hidden="hidden" />
		<else />
		<input id="grade_name" type="text" name="grade" value="{$grade}" hidden="hidden" />
		</empty>
		<empty name="class">
		<input id="class_name" type="text" name="class" value="一班" hidden="hidden" />
		<else />
		<input id="class_name" type="text" name="class" value="{$class}" hidden="hidden" />
		</empty>
		<input type="text" name="schoolid" value="{$schoolid}" hidden="hidden"/>
		<button class="submit blend-button blend-button-yellow blend-button-large">开始考试</button>
		<div class="tips f-1x">温馨提示：一共20道选择题，每道题5分，考试时间不限。</div>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#grade_id").bind('change',function(){
		var grade_name = $(this).find("option:selected").text();
		// alert(grade_name);
		$("#grade_name").val(grade_name);
	});
	$("#class_id").bind('change',function(){
		var class_name = $(this).find("option:selected").text();
		// alert(class_name);
		$("#class_name").val(class_name);
	});
	var grade_id = {$grade_id};
	var class_id = {$class_id};
	var arr1 = new Array();
	$("#grade_id option").each(function(){
		var valg = $(this).val();
		arr1.push(valg);
	});
	for (var i = 1; i < arr1.length; i++) {
		if(i==grade_id){

			$("#grade_id").children().eq(i-1).attr('selected','selected');
		}
	};
	var arr2 = new Array();
	$("#class_id option").each(function(){
		var vals = $(this).val();
		arr2.push(vals);
	});
	for (var a = 1; a < arr2.length; a++) {
		if(a==class_id){

			$("#class_id").children().eq(a-1).attr('selected','selected');
		}
	};
});
</script>
</body>
</html>